<?php

namespace common\models;

use Yii;
use yii\base\Model;

class RegisterForm extends Model
{
    public $mobile;
    //public $verifyCode;
    public $pwd;
    public $mobileCode;
    public $rePwd;
    public $isAllowed;


    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['mobile', 'pwd', 'mobileCode','rePwd'], 'required'],
            ['mobile', 'trim'],
            ['pwd', 'string', 'min' => 6,'message'=>'密码长度必须大于6位'],
            ['pwd', 'string', 'max'=>16,'message'=>'密码长度必须小于16位'],
            ['rePwd', 'compare', 'compareAttribute' => 'pwd','message'=>'两次输入的密码不一致！'],
        ];
    }
}
